<?php
/**
 * @version     1.0.1
 * @package     com_ganeshavereadores
 * @copyright  	
 * @license     
 * @author      Jorge Eduardo
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.keepalive');



//Load admin language file
$lang = JFactory::getLanguage();
$lang->load('com_ganeshavereadores', JPATH_ADMINISTRATOR);

?>


<div class="container proposicao">
<h3>Proposições</h3>

<div class="content">
	<?php 	
	
	
	if ($this->item) : 
		$item = $this->item;
		
		$ano= $item->ano;
		$data= getDateMyFormat($item->data);
		$numero= $item->numero;
		$titulo = $item->titulo;
		$conteudo = $item->conteudo;
		$catalias = $item->catalias
	?>
	
	<?php if ($this->item) : ?>
	
	<h4><?php echo $this->escape($item->catalias) . ' - ' . $this->escape($item->numero)  .'/'. $this->escape($item->ano) ;?></h4>
	
	<span class="titulo"><?php echo $this->escape($titulo);?></span>
	<span class="data"><?php echo $data;?></span>	
		<?php echo $conteudo;?>	
	<?php 
	else:
    	echo JText::_('COM_VEREADORES_ITEM_NOT_LOADED');
	endif;
?>

	
	<?php 
	
	endif;
	?>	
	

	
</div>


	<div class="btnback">
		<a href="javascript:history.go(-1)" title="Voltar à página anterior" ><img src="<?php echo JUri::base() ?>templates/cmmacae/img/btnBack.jpg" /></a>
	</div>

</div>

<?php 

function getDateMyFormat($value) 
{
	
	$dia = date("d", strtotime($value));
	$ano = date("Y", strtotime($value));
	$mes = date("m", strtotime($value));
	$semana = date("w", strtotime($value));

	$html = '';
	
	$html .= $dia  . '/' . $mes . '/' .  $ano;
	
	return $html;
}

?>